/**
 * Copyright (C) 2010-2025 Structr GmbH
 *
 * This file is part of Structr <http://structr.org>.
 *
 * Structr is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as
 * published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 *
 * Structr is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with Structr.  If not, see <http://www.gnu.org/licenses/>.
 */
#pages {
	display: flex;
	flex-direction: column;
}

#pagesTree {
	flex-grow: 1;
	overflow: auto;
	/*margin-top: -1rem;*/
	padding-top: 1rem;
}

#pages-controls {
	display: flex;
	margin-top: 1rem;
	margin-left: 1rem;
}

#pagesPager {
	flex-grow: 1;
	display: inline-block;
}

#pagesPagerFilters {
	margin-top: 0.5rem;
}

#pages-actions .dropdown-select,
#pages-controls .icon {
	color: var(--icon-stroke);
}

#pages-actions .dropdown-select.action {
	color: var(--solid-white);
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='100' height='100' fill='white'><polygon points='0,0 100,0 50,50'/></svg>");
	background-size: .75rem;
	background-position: calc(100% - .5rem) calc(100% - .6rem);
	padding-right: 2rem;
}

#pages-actions .dropdown-select.action:hover {
	color: var(--solid-white);
	background-color: var(--dark-structr-green);
}

#add_template {
	white-space: nowrap;
}

#pages-actions .dropdown-menu-container {
	width: 10rem;
}

#pagesPagerFilters input[type=text] {
	width: 7rem;
	margin-right: .5rem;
}
#pagesPagerFilters input[type=text][data-attribute="category"] {
	width: 5rem;
}

#pages .node.page {
	margin-left: 1rem;
}

/* start dragndrop classes in pages */
#pages .node:hover,
#componentsArea .node:hover,
#localizations .node:not(.schema):hover {
	cursor: pointer;
}

.node > div.before-node,
.node > div.after-node {
	display: none;
	height: .5rem;
}

.node.drag-over > .node-container:not(.page):not(.drop-not-possible) {
	border-left: .5rem solid var(--hover-highlight-color-inactive);
}

.node.drag-over > .node-container:not(.page):not(.drop-not-possible).drag-hover {
	border-left: .5rem solid var(--hover-highlight-color-active);
}

.node.show-drop-target-before > div.before-node,
.node.show-drop-target-after > div.after-node {
	display: block;
	background: var(--hover-highlight-color-inactive);
}

.node.show-drop-target-before > div.before-node.drag-over,
.node.show-drop-target-after > div.after-node.drag-over,
.element-dropzone.allow-drop.drag-over.drag-hover {
	background: var(--hover-highlight-color-active);
}

.node-container.drag-background-drop-forbidden {
	background-image: var(--striped-background);
	background-size: 20px 20px;
}

.node.drag-background-node-highlight {
	background: var(--hover-node-background-highlight-color);
}
/* end dragndrop classes in pages */

.previewBox {
	background: var(--solid-white);
	padding: 0;
	margin: 0;
	overflow: hidden ! important;
	-moz-transform-origin: 0 0;
	-o-transform-origin: 0 0;
	-webkit-transform-origin: 0 0;
	width: 100%;
	height: 100%;
	box-shadow: 0 0 .625rem 0 rgba(0,0,0,0.1);
}

.previewBox iframe {
	width: 100%;
	height: calc(100% + 1px);
	border: 0;
	padding: 0;
	margin: 0;
	-moz-transform-origin: 0 0;
	-o-transform-origin: 0 0;
	-webkit-transform-origin: 0 0;
}

#previewSlideout .content-container {
	margin-top: 0;
}

#add_page {
	right: 1rem;
}

#import_page {
	right: 5rem;
}

#add_template {
	right: 9rem;
}

#delete-all-unattached-nodes {
	margin: 1rem;
}

#pagesTree .node.nodeSelected {
	background-color: var(--structr-light-green);
}

/**
 * Central content container
 */
.dialogText .content-container {
	margin-top: 0;
	height: calc(100% - 20rem);
}
.content-container {
	margin-top: 0;
	background-color: var(--solid-white);
	box-shadow: 0 0 .625rem 0 rgba(0,0,0,0.1);
	overflow: auto;
	height: calc(100vh - 10rem);
	position: relative;
}

.content-editor-container .editor-button-container {
	padding: 0 0 1rem 2rem;
}

.content-editor-container .editor-info-container {
	padding: 1rem 0 1rem 2rem;
	width: calc(100% - 3rem);
	overflow: hidden;
}

.content-editor-container .speechToText {
	position: absolute;
	right: 2rem;
	bottom: 2rem;
}

.properties-container h2,
.properties-container h3,
.properties-container h4 {
	padding-left: 1rem;
}

.general-container {
	padding: 0 1rem;
}

/**
 * Submenu
 */
#function-bar .tabs-menu {
	/*margin-left: 44rem;*/
	/*transition: all	.1s ease-in-out;*/
}

#function-bar .tabs-menu.hidden, #function-bar .tabs-menu li.hidden {
	display: none;
}

.repeater-container, .security-container, .events-container, .linkable-container, .routing-container {
	padding: 0 1rem;
}

.repeater-container .input-section {
	margin: 2rem 0 4rem 0;
}

.query-type-buttons button.active {
	margin-bottom: 1rem;
}


/**
 * Localizations slideout
 */

#localization-preview-page {
	max-width: 10rem;
}

#localizations .inner {
	margin: 1rem 0 0 0;
	height: 100%;
	display: flex;
	flex-direction: column;
}

#localizations .results {
	overflow-x: hidden;
	overflow-y: auto;
	margin-top: .5rem;
}

#localizations .inner input.locale {
	max-width: 3.5rem;
	margin-right: .5rem;
}

.localization-element table {
	width: calc(100% - 48px);
	margin-left: 26px;
}

.localization-element table th {
	text-align: left;
}

.localization-element table td.input {
	width: 40%;
}

.localization-element table td.input input {
	width: calc(100% - 28px);
	margin-right: 2px;
}

#localizations td.allow-break {
	word-break: break-all;
}

#localizations div.allow-break {
	word-break: break-all;
	white-space: normal;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	overflow: hidden;
	-webkit-box-orient: vertical;
	text-overflow: ellipsis;
}

#newComponentDropzone {
	margin: 1rem;
}

.element-dropzone {
	border: .15rem dashed lightgray;
	border-radius: .25rem;
	color: lightgray;
	margin-bottom: 1rem;
}

.element-dropzone .node {
	margin: .5rem;
}

.element-dropzone.allow-drop {
	color: black;
}

.element-dropzone .info-icon .sprite {
	min-width: 16px;
}

.element-dropzone .info-icon .active {
	visibility: hidden;
	display: none;
}

.element-dropzone.allow-drop .info-icon .inactive {
	visibility: hidden;
	display: none;
}

.element-dropzone.allow-drop .info-icon .active {
	visibility: visible;
	display: inline-block;
}

/**
	Linkable Tab
*/
.linkable-container .linkBox {
	border: 1px solid var(--gray-ccc);
	background-color: var(--solid-white);
}

.linkable-container .linkBox .pager {
	border-bottom: 1px solid var(--gray-ccc);
	background-color: var(--gray-bg);
	padding: 3px 0px 3px 6px;
}

.linkable-container #foldersToLink .node {
	vertical-align: top;
}

.linkable-container .node {
	cursor: pointer;
	margin: 4px;
	min-width: 100px;
}

.linkable-container .nodeHover b {
	cursor: pointer ! important;
}

/**
	Widgets slideout
 */
.widget-folder {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
}

.widget {
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 70px;
	color: #333;
	background-color: var(--solid-white);
	border: 1px solid transparent;
	border-radius: 5px;
	cursor: pointer;
}

.widget img {
	opacity: 0.75;
	flex-grow: 1;
}

.widget:hover img {
	opacity: 1.0;
}

.widget:hover {
	border: 1px solid #999;
}

.widget span {
	width: 100%;
	text-align: center;
	flex-grow: 0;
	text-overflow: ellipsis;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
	word-break: break-word;
}

.widget-header b, .widget-header span {
	cursor: pointer;
	line-height: 2rem;
}

.widget input.new-name {
	width: 90%;
}

/**
 Active Elements
 */
.active-elements-container svg {
	margin-bottom: -5px;
}
.active-elements-container svg > * {
	filter: drop-shadow(0 0 .625rem rgba(0, 0, 0, .1));
}

.active-elements-container svg *:hover,
.active-elements-container svg * text:hover {
	stroke: #bbbbbb;
}
svg g.diagram-element[data-type="ActionMapping"] rect {
	fill: #ff8800;
}

svg *[data-type="ListDataSource"] {
	fill: #2222aa;
}